package com.czhong.ssh.springTest;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by DELL on 2017/2/18.
 *
 */
public class TestSpring {
    @Test
    public void test(){
        //加载Spring的配置文件
        ApplicationContext context = new ClassPathXmlApplicationContext("springConfig.xml");

        //得到配置文件创建的对象
        ServiceImpl service = (ServiceImpl) context.getBean("serviceImpl");
        service.service("zhong");
    }
}
